import PageContent from '@/components/page-content/page-content.vue';
import { ref } from 'vue';
export function useContentData(): any[] {
  const pageContentRef = ref<InstanceType<typeof PageContent>>();
  const defaultPageInfo = { currentPage: 1, pageSize: 10 };
  // 搜索
  const handleSearchClick = (formData: any) => {
    pageContentRef.value?.getPageData(defaultPageInfo);
    pageContentRef.value!.pageInfo = defaultPageInfo;
  };
  // 重置
  const handleResetClick = (formData: any) => {
    pageContentRef.value?.getPageData(defaultPageInfo);
    pageContentRef.value!.pageInfo = defaultPageInfo;
  };

  return [pageContentRef, handleSearchClick, handleResetClick];
}
